<template>
  <!--532.3-->
  <swiper>
    <swiper-item v-for="item in banners">
      <a :href="item.link">
        <img :src="item.image" alt="">
      </a>
    </swiper-item>
  </swiper>
</template>

<script>
//532.1 导入轮播组件
import {Swiper, SwiperItem} from "components/common/swiper";

export default {
  name: "HomeSwiper",
  // 532.4 传入数据
  props: {
    banners: {
      type: Array,
      default() {
        return []
      }
    }
  },
  components: {
    //532.2 注册轮播组件
    Swiper,
    SwiperItem
  }
}
</script>

<style scoped>

</style>
